<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="application/javascript" src="../../js/jquery.min.js"></script>
<title>Insert title here</title>
</head>
<body>
    <img id="imm" src="https://imgsa.baidu.com/exp/w=480/sign=1ddd3045a818972ba33a01c2d6cc7b9d/728da9773912b31b7d9ac1788518367adbb4e1e9.jpg">
    <h2 id="imt">请等待</h2>
    <div id="someurl"></div>
    <script type="application/javascript">
        $(function(){
            $.get("/searchurl?url_name=${cs}",function(data){
                var a = eval(data);
                for(var i=0;i<data.length;i++){
                    var re = /[^h]*?.(com|cn|net|org|biz|info|cc|tv)/;
                    var result=  re.exec(a[i].url_parent);
                    if(result){
                        $("#someurl").append("<a href='h"+result[0]+a[i].url_context+"'>"+a[i].url_name+"</a>&nbsp;&nbsp;");
                        if(i%10==0){
                            $("#someurl").append("</br>")
                        }
                    }else{
                    }
                }
                $("#imm").hide();
                $("#imt").hide();
            });

        })

    </script>
</body>
</html>